package com.example.splash;


import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.util.Log;
import android.view.Menu;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;
/**
 * 
 * @author pablo_guerrero
 *
 */
public class SplashActivity extends Activity {

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		//For FullScreen
    	requestWindowFeature(Window.FEATURE_NO_TITLE);
    	getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN	, WindowManager.LayoutParams.FLAG_FULLSCREEN);    	
		setContentView(R.layout.activity_splash);

	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.splash, menu);
		return true;
	}

	/**
	 * This function opens MainActivity
	 * Called when button is pressed
	 * @param v
	 */
    public void openMainActivity(View v){
    	
    	Log.d("PABLO","Opening Main activity");
    	Intent intent = new Intent(this, MainActivity.class);
    	intent.putExtra("extraValue","Hello");
    	startActivity(intent);
    }
    
    /**
	 * This function opens ChildActivity
	 * Called when button is pressed
     * @param v
     */
	 public void openChild(View v){
	    	
	    	Log.d("PABLO","Opening Main activity");
	    	Intent intent = new Intent(this, ChildActivity.class);
	    	intent.putExtra("extraValue","Hello");
	    	startActivity(intent);
	 }

}
